package com.vtron.mq.models;

import com.alibaba.fastjson.annotation.JSONField;
import com.vtron.core.BaseObject;
import lombok.Data;

import java.util.Date;

/**
 * 消息包
 * @date : 2022/4/26 16:00
 * @author: 忻龙彪
 */
@Data
public class MsgPackage extends BaseObject {
    /**
     * 业务类型
     */
    private PackageType stype;
    /**
     * 数据包描述
     */
    private String description;
    /**
     * 消息数据体
     */
    private String body;
    /**
     * 时间戳
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date timestamp=new Date();

    public  MsgPackage(){}
    public  MsgPackage(PackageType stype,String sbody){
        this.stype=stype;
        this.body=sbody;
    }
}
